public class temp {
    public static void main(String[] args) {
        int[][] A = {{1}, {1, 1}, {1, 2, 1}, {1, 3, 3, 1}, {1, 4, 6, 4, 1}};
        Print(A);
    }

    public static void Print(int[][] A) {
        for (int i = 0; i < 5; i++) {
            for (int j=0;j<i+1;j++){
                if(j==i){
                    System.out.print(A[i][j]);
                }else {
                    System.out.print(A[i][j] + ",");
                }
            }
            System.out.println();
        }
    }
}
